import request from 'utils/request'

// 请求文章列表
const fetchArtList = (params={})=>request.get('/artList',{ params })
// 请求分类列表
const fetchCateList = (params={}) =>  request.get('/cateList',{ params })
// 增加文章
const addArt = (params={})=>request.post('/artAdd',params)
// 获取文章详情
const getArtById = id=>request.post('/getArt',{ artId: id })
// 更新文章
const updateArt = (params={})=>request.post('/updateArt',params)
// 删除文章
const delArt = id=>request.post('/delArt',{ id })
// 用户登录
const login = (params = {})=>request.post('/login',params)
export {
  fetchArtList,
  fetchCateList,
  addArt,
  getArtById,
  updateArt,
  delArt,
  login
}